# Please install OpenAI SDK first: `pip3 install openai`

from openai import OpenAI

# for backward compatibility, you can still use `https://api.deepseek.com/v1` as `base_url`.
client = OpenAI(api_key="sk-eb8af9b76f934ef89538071d102626e3", base_url="https://api.deepseek.com")


abc = '用户:孙金楼于2024年6月办理199融合套餐接入号:132535488现进厅申请办理移机（一年内无移机记录），对于费用100元不认可申请减免，请领导审批（已推荐会员随心选体验不要）。\
                                    请帮我分析一下这个申请，并给出相应的建议。'
response = client.chat.completions.create(
    model="deepseek-chat",
    messages=[
        {"role": "system", "content": "你是一个电信业务专家，即需要存量收入保有，又要防范服务风险"},
        {"role": "user",
         "content": abc
         }
  ],
    max_tokens=1024,
    temperature=0.7,
    stream=False
)
#print(client.models.list())


print(response.choices[0].message.content)